package com.culturalCenter.dataCenter.mapper.user;

import com.culturalCenter.dataCenter.entity.user.UserTypeCount;
import com.culturalCenter.dataCenter.mapper.base.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserTypeCountMapper extends BaseMapper<UserTypeCount> {

    /**
     * 通过用户id查询
     *
     * @param userId 用户id
     *
     * @return
     */
    List<UserTypeCount> queryByUserId(@Param("userId") String userId);

    @Delete("TRUNCATE cdc_user_type_count")
    void deleteAll();

}
